<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
Object obj=request.getSession().getAttribute("role_resource");
if(null==obj){
	response.setStatus(1000);
	return;
}
%> 
    
	<script type="text/javascript">
		//用户参数列表数据源
		var code_store = new Ext.data.JsonStore({
    		root: "data",
    		totalProperty: "total",
    		fields: ["codetype","codename","codetypeid"],
    		url: "systemUserCode!selectSystemUserCode.action"
    	});
    	
			//定义数据显示面板
			var p1 = {
				id: "p1",
				xtype: "grid",
				stripeRows:true,
				loadMask : true,//在加载数据时遮罩住元素,替换元素Updater的加载提示器，并且在初始化加载之后销毁
				autoExpandColumn: "codename",
				autoExpandMin : 100,//自动填充最小宽度
				store: code_store,
				headersDisabled: true,
				columns:[
	    	    	new Ext.grid.RowNumberer({header: "序号", width: 35}),
    					{header: "编号",		dataIndex: "codetype",	menuDisabled: true},
    					{header: "名称",		dataIndex: "codename",	id: "codename",	menuDisabled: true},
    					{header: "类别",		dataIndex: "codetypeid",	menuDisabled: true}
				],
				bbar: new Ext.ux.PagingToolbar({
    	        	pageSize:limit,
    	        	store: code_store
    	    	})
			};
		
		code_store.load({params:{start:0,limit:limit}});
		
		var CenterPanel=Ext.getCmp("CenterPanel");
		CenterPanel.removeAll();
		CenterPanel.add(p1);
		CenterPanel.doLayout();
	</script>
